<%@ page import="java.util.ArrayList" %>
<%@ page import="entity.Plate" %>
<%@ page import="Impl.plateDaoImpl" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<DIV style="FONT-SIZE: 14px; PADDING-TOP: 60px; FONT-FAMILY: Arial" align=center>
    <DIV align="left">当前操作是：版块移动</DIV>
    <HR style="WIDTH: 99%; COLOR: #cccccc; HEIGHT: 1px">
</DIV>
<div class="ManagerForm">
    <form name="Form1" method="post" action="moveSection.jhtml" language="javascript" onsubmit="return check();"
          id="Form1">
        <input type="hidden" name="action" value="add"/>
        <table width="968" align="center" cellpadding="4" cellspacing="0" id="t1">

            <tr>
                <td width="50%" align="left" valign="top" class="panelbox">
                    <table width="100%">

                        <tr>
                            <td width="99" style="width: 90px">请选择需要移动的子板块</td>
                            <td width="338">
                                <select name="select1">
                                    <option value="-1" selected="selected">...</option>
                                    <%
                                        ArrayList<Plate> list = new ArrayList<>();
                                        list = (ArrayList<Plate>) new plateDaoImpl().findAllPlate();
                                        for (int i = 0; i < list.size(); ++i)
                                        {
                                            int sId = list.get(i).getSid();
                                            String sName = list.get(i).getsName();
                                    %>

                                    <option value="<%=sId%>"><%=sName%>
                                    </option>

                                    <%
                                        }
                                    %>
                                </select>
                            </td>
                        </tr>

                        <tr>
                            <td width="99" style="width: 90px">请选择移动后的父板块</td>
                            <td width="338">
                                <select name="select2">
                                    <option value="-1" selected="selected">....</option>
                                    <%
                                        ArrayList<Plate> list2 = new ArrayList<>();
                                        list2 = (ArrayList<Plate>) new plateDaoImpl().findPlateByPId(0);
                                        for (int i = 0; i < list2.size(); ++i)
                                        {
                                            int sId = list2.get(i).getSid();
                                            String sName = list2.get(i).getsName();
                                    %>
                                    <option value="<%=sId%>"><%=sName%>
                                    </option>
                                    <%
                                        }
                                    %>
                                </select>
                            </td>
                        </tr>


                    </table>
                </td>
            </tr>
            <tr align="center" valign="middle">
                <td height="34" class="panelbox"></td>
            </tr>
            <tr align="center" valign="middle">
                <td class="panelbox">
                    <button type="submit" class="ManagerButton" id="SubmitAdd" onclick="">
                        移动
                    </button>&nbsp;&nbsp;&nbsp;&nbsp;
                    <button onclick="window.history.back();" id="Button3" class="ManagerButton" type="button"> 返 回
                    </button>
                </td>
            </tr>
        </table>
    </form>
</div>

</body>
</html>
